using System;
using System.Reflection;

namespace UnityEngine
{
#if UNITY_FLASH
	[NotRenamed]
	internal static class ScriptingMethodHelper
	{
		[NotRenamed]
		internal static MethodInfo GetMethodInfo(Type type, string methodName)
		{
			return type.GetMethod(methodName);
		}

		[NotRenamed]
		internal static int NumberOfArgumentsOf(MethodInfo methodInfo)
		{
			return methodInfo.GetParameters().Length;
		}

		[NotRenamed]
		internal static Type NthArgumentType(MethodInfo methodInfo, int index)
		{
			var args = methodInfo.GetParameters();
			if (args.Length <= index)
				return null;
			return args[index].ParameterType;
		}
	}
#endif
}
